package com.smh.springboottest.service.impl;

import com.smh.springboottest.dao.po.User;
import com.smh.springboottest.mapper.UserMapper;
import com.smh.springboottest.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shiminghui
 * @date 2024/9/24 13:33
 * @description: TODO
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public void add(User user) {
        int insert = userMapper.insert(user);
        if (insert > 0) {
            System.out.println("添加成功");
        } else {
            System.out.println("添加失败");
        }
    }
}
